@import './variables.less';

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif;
  line-height: 1.5;
  color: @text-color;
  background-color: #f5f7fa;
}

// Container
.container {
  width: 100%;
  max-width: @container-width;
  margin: 0 auto;
  padding: 0 @spacing-medium;

  @media (max-width: @screen-sm) {
    padding: 0 @spacing-small;
  }
}

// Flex utilities
.flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}

// Text utilities
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

// Margin utilities
.mt-small {
  margin-top: @spacing-small;
}

.mt-medium {
  margin-top: @spacing-medium;
}

.mt-large {
  margin-top: @spacing-large;
}

.mb-small {
  margin-bottom: @spacing-small;
}

.mb-medium {
  margin-bottom: @spacing-medium;
}

.mb-large {
  margin-bottom: @spacing-large;
}

// Responsive utilities
.hidden-mobile {
  @media (max-width: @screen-sm) {
    display: none !important;
  }
}

.hidden-desktop {
  @media (min-width: @screen-md) {
    display: none !important;
  }
}

.empty-cart {
  text-align: center;
  color: @text-color-secondary;
  font-size: @font-size-lg;
}

// Card styles
.card {
  background: #fff;
  border-radius: @border-radius;
  box-shadow: @box-shadow;
  padding: @spacing-medium;
}

// Button styles
.btn {
  display: inline-block;
  padding: @spacing-small @spacing-medium;
  border-radius: @border-radius;
  font-size: @font-size-base;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;

  &:hover {
    opacity: 0.8;
  }

  &:active {
    transform: translateY(1px);
  }
}

.btn-primary {
  background-color: @primary-color;
  color: #fff;
}

.btn-danger {
  background-color: @danger-color;
  color: #fff;
}

// Form styles
.form-group {
  margin-bottom: @spacing-medium;
}

.form-label {
  display: block;
  margin-bottom: @spacing-small;
  color: @text-color;
  font-size: @font-size-base;
}

.form-input {
  width: 100%;
  padding: @spacing-small;
  border: 1px solid @border-color;
  border-radius: @border-radius;
  font-size: @font-size-base;
  transition: border-color 0.3s ease;

  &:focus {
    border-color: @primary-color;
    outline: none;
  }
}

// Animation
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
} 
.mb-3 { margin-bottom: @spacing-large; } 

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

// x 和 y 滚动条交汇处
::-webkit-scrollbar-corner {
  background: transparent;
}

// 滚动条轨道
::-webkit-scrollbar-track {
  background: transparent;
}

// 滚动滑块
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

::-webkit-scrollbar-thumb:active {
  background: #aaa;
}